package com.itheima.controller;

import com.itheima.pojo.OperateLog;
import com.itheima.pojo.PageBean;
import com.itheima.pojo.Result;
import com.itheima.service.LogService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class LogController {
    @Resource
    private LogService logService;
    /**
     * 日志列表查询
     */
    @GetMapping("/log/page")
    public Result OperateLog(@RequestParam(defaultValue = "1") Integer page, @RequestParam(defaultValue = "10") Integer pageSize){
        PageBean<OperateLog> datas = logService.operateLog(page,pageSize);
        return Result.success(datas);
    }
}
